#ifndef _CONTROL_H
#define _CONTROL_H

typedef enum {
	U2WRQ_RADIO_WRITE = 0,	// write data to radio
	U2WRQ_RADIO_READ,		// read data from radio buffer
	U2WRQ_RADIO_RCOUNT,		// data count from radio read buffer
	U2WRQ_RADIO_REGRW,		// radio chip register read/write
	U2WRQ_RADIO_REGBIT,
	U2WRQ_MEM8_RW,
	U2WRQ_MEM8_BIT,
	U2WRQ_MCU_RESET,
	U2WRQ_FLASH_WRITE,
	U2WRQ_FLASH_READ,
	U2WRQ_EEPROM_WRITE,
	U2WRQ_EEPROM_READ,
	U2WRQ_IR_CONFIG,
	U2WRQ_IR_WDATA,
	U2WRQ_LAST_ERR,
	U2WRQ_READ_TEMP,
	U2WRQ_IDLE,
} u2w_request_t;

int usb_ctrl_cmd (
	libusb_device_handle *dev, 
	int request, 
	int wValue,
	int wIndex, 
	char *buffer, 
	int buflen, 
	int timeout, 
	int in);
	
int u2wSetIO(libusb_device_handle *dev, const char *strPort, int index, int act);


#endif

